//
//  ImageShowCell.m
//  Shengzhuli
//
//  Created by subook on 2017/8/30.
//  Copyright © 2017年 kamangkeji. All rights reserved.
//

#import "ImageShowCell.h"

@implementation ImageShowCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        
        [self createUI];
    }
    return self;
}
- (void)createUI {
    
    self.editButton = [UIButton buttonWithType:(UIButtonTypeCustom)];
    self.editButton.frame = CGRectMake(ScreenW-100, 10, 40, 15);
    [self.editButton setTitle:@"编辑" forState:(UIControlStateNormal)];
    [self.editButton addTarget:self action:@selector(goToEdit) forControlEvents:(UIControlEventTouchUpInside)];
    [self.contentView addSubview:self.editButton];
    
    self.deleteButton = [UIButton buttonWithType:(UIButtonTypeCustom)];
    self.deleteButton.frame = CGRectMake(ScreenW-50, 10, 40, 15);
    [self.deleteButton setTitle:@"删除" forState:(UIControlStateNormal)];
    [self.deleteButton addTarget:self action:@selector(goToDelete) forControlEvents:(UIControlEventTouchUpInside)];
    [self.contentView addSubview:self.deleteButton];
}

- (void)goToEdit {
    if (self.editButtonBlock) {
        self.editButtonBlock();
    }
}
- (void)goToDelete{
    if (self.editButtonBlock) {
        self.editButtonBlock();
    }
}
-(void)updateCellWithImageArr:(NSMutableArray *)imageArr text:(NSString *)text{
    //[singleImaView sd_setImageWithURL:url placeholderImage:GetImage(@"beijngtu")];
    for (int i =0; i<imageArr.count; i++) {
        NSLog(@"%@",imageArr[i]);
    }
    
    
}
- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
